package com.examplee.username.httpfrist_01;

import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
import android.widget.ImageView;

public class MainActivity extends AppCompatActivity {
private WebView webView;
        Handler handler=new Handler();
    ImageView imageView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
//        webView= (WebView) findViewById(R.id.webwiew1);
        imageView= (ImageView) findViewById(R.id.imageview1);
//      new HttpThread("http://www.baidu.com",webView,handler).start();//如果不调用start（）方法，则无法开启一个新线程
new HttpThread("http://h.hiphotos.baidu.com/image/pic/item/6c224f4a20a446239e8d311" +
    "c9b22720e0cf3d70d.jpg",imageView,handler).start();
        //如果不调用start（）方法，则无法开启一个新线程

    }
}
